<!DOCTYPE html>
<html lang="en">
<head>
	<meta charset="utf-8">
	<meta name="viewport"content="width=device-width,minimum-scale=1.0,maximum-scale=1.0,user-scalable=no"/>
	<meta name="apple-mobile-web-app-capable" content="yes" />
	<@cms_site id=siteId!'' >
	<@cms_channel id=businessId!'' >
		<meta name="keywords" content="${(site.keywords)!''},${(tag_bean.name)!''}" />
		<title>${(site.name)!''}&nbsp;-&nbsp;${(tag_bean.name)!''}</title>
	</@cms_channel>
	</@cms_site>
	<link rel="stylesheet" href="${ctx}/u/${(siteId)!''}/f/css/weui.min.css" />
	<link rel="stylesheet" href="${ctx}/u/${(siteId)!''}/f/css/jquery-weui.min.css" />
	<link rel="stylesheet" href="${ctx}/u/${(siteId)!''}/f/css/phone.css" />
	<link rel="stylesheet" href="${ctx}/u/${(siteId)!''}/f/css/style.css" />
	<link href='${ctx}/u/${(siteId)!''}/f/css/flipping_gallery.css' rel='stylesheet' type='text/css'>
	<script type="text/javascript" src="${ctx}/u/${(siteId)!''}/f/js/jQuery.1.8.2.min.js" ></script>
	<script type="text/javascript" src="${ctx}/u/${(siteId)!''}/f/js/height.js" ></script>
	<script type="text/javascript" src="${ctx}/u/${(siteId)!''}/f/js/jquery.flipping_gallery.js"></script>
	<script type="text/javascript">
	
		/** 加载下一页 **/
		function loadNextPage(){
			// 要查询的页码 = 当前页码 + 1
			var pageIndex = parseInt($("#pageIndex").val()) + 1;
			// 每页大小
			var pageSize = $("#pageSize").val();
			// 排序规则
			var orderBy = $("#orderBy").val();
			
			$.ajax({
				url: "${ctx}/f/mp/${siteId}/${businessId}/dom" ,
				data: { 
					"pageIndex" : pageIndex , 
					"pageSize" : pageSize ,
					"orderBy" : orderBy ,
					"next" : "true"  
				} , 
				dataType: "html" ,
				success: function(response){
					$("#content_list").append(response);
					// 变更当前页码 
					$("#pageIndex").val(pageIndex);
				}
			});
		}
		
		/** 跳转到活动列表页面 **/
		function toActivityListPage(){
			location.href = "${ctx}/f/mp/${siteId}/h_10016";
		}
	</script>
</head>
<body>
	<div class="personheart_all">
		<@cms_member>
		<div class="perheart_first lin_center">
			<div class="perheart_box tc">
				<div class="heart_img">
					<img src="${(tag_bean.portrait)!''}"  />
				<!-- <img src="${ctx}/u/${(siteId)!''}/f/images/heart_02.jpg" /> --></div>
				<div class="name">${(tag_bean.nickname)!''}</div>
				<div class="item">
					<span class="display-b pr16 tr per50">参加活动：${(tag_bean.activityPartInList?size)!''}次</span>
					<span class="display-b pl16 tl per50">积分：${(tag_bean.point)!''}分</span>
				</div>
				<div class="earn" onclick="toActivityListPage();">挣积分</div>
			</div>
		</div>
		</@cms_member>
		<div class="perheart_main">
			<div class="perheart_list boxSizing">
				<ul id="content_list" >
					<#include "memberListAjax.html">
				</ul>
				<div style="clear: both;"></div>
			</div>
			<div id="qb_wc" class="weui-loadmore">
		      	<i class="weui-loading"></i>
		      	<span class="weui-loadmore__tips">正在加载...</span>
		    </div>
			<!-- 加载下一页 -->
			<input type="hidden" id="orderBy" value="6" >
			<input type="hidden" id="pageIndex" value="${(returnDatas.page.pageIndex)!0}" >
			<input type="hidden" id="pageSize" value="${(returnDatas.page.pageSize)!10}" >
			<!-- <button type="button" onclick="loadNextPage();">加载下一页</button> -->
		</div>
	</div>
<script type="text/javascript" src="${ctx}/u/${(siteId)!''}/f/js/jquery-weui.min.js" ></script>
<script type="text/javascript">
		var loading = false;  //状态标记
		$(document.body).infinite().on("infinite", function() {
		  if(loading) return;
		  loading = true;
		  setTimeout(function() {
			  loadNextPage();
		      loading = false;
		  }, 1500);   //模拟延迟
		});
</script>	
</body>
</html>